    const Allarray=[
      {
          "id": "1106598418081521185",
          "createTime": "2023-05-12 15:07:03",
          "createUser": "0",
          "updateTime": "2023-05-12 15:08:44",
          "updateUser": "0",
          "code": "HZ000001",
          "name": "1235",
          "personName": "64",
          "phone": "12028226428",
          "email": "123456@itcast.com",
          "location": "北京市/市辖区/西城区",
          "province": "110000",
          "city": "119900",
          "area": "110102",
          "address": "1",
          "status": 0,
          "remark": "1",
          "createName": "刘世娟",
          "updateName": null,
          "logicDel": 1
      },
      {
          "id": "798980939605607297",
          "createTime": "2023-05-11 18:25:01",
          "createUser": "0",
          "updateTime": "2023-05-12 15:00:04",
          "updateUser": "0",
          "code": "HZ000003",
          "name": "王姐",
          "personName": "王丽莉",
          "phone": "12021236632",
          "email": "123456@itcast.com",
          "location": "北京市/市辖区/东城区",
          "province": "110000",
          "city": "119900",
          "area": "110101",
          "address": "合立方小区",
          "status": 0,
          "remark": "",
          "createName": "刘世娟",
          "updateName": "刘世娟",
          "logicDel": 1
      },
      {
        "id": "798980939605607297",
        "createTime": "2023-05-11 18:25:01",
        "createUser": "0",
        "updateTime": "2023-05-12 15:00:04",
        "updateUser": "0",
        "code": "HZ000003",
        "name": "王姐",
        "personName": "王丽莉",
        "phone": "12021236632",
        "email": "123456@itcast.com",
        "location": "北京市/市辖区/东城区",
        "province": "110000",
        "city": "119900",
        "area": "110101",
        "address": "合立方小区",
        "status": 0,
        "remark": "",
        "createName": "刘世娟",
        "updateName": "刘世娟",
        "logicDel": 1
    },
    {
      "id": "798980939605607297",
      "createTime": "2023-05-11 18:25:01",
      "createUser": "0",
      "updateTime": "2023-05-12 15:00:04",
      "updateUser": "0",
      "code": "HZ000003",
      "name": "王姐",
      "personName": "王丽莉",
      "phone": "12021236632",
      "email": "123456@itcast.com",
      "location": "北京市/市辖区/东城区",
      "province": "110000",
      "city": "119900",
      "area": "110101",
      "address": "合立方小区",
      "status": 0,
      "remark": "",
      "createName": "刘世娟",
      "updateName": "刘世娟",
      "logicDel": 1
  },
  {
    "id": "798980939605607297",
    "createTime": "2023-05-11 18:25:01",
    "createUser": "0",
    "updateTime": "2023-05-12 15:00:04",
    "updateUser": "0",
    "code": "HZ000003",
    "name": "王姐",
    "personName": "王丽莉",
    "phone": "12021236632",
    "email": "123456@itcast.com",
    "location": "北京市/市辖区/东城区",
    "province": "110000",
    "city": "119900",
    "area": "110101",
    "address": "合立方小区",
    "status": 0,
    "remark": "",
    "createName": "刘世娟",
    "updateName": "刘世娟",
    "logicDel": 1
},
{
  "id": "798980939605607297",
  "createTime": "2023-05-11 18:25:01",
  "createUser": "0",
  "updateTime": "2023-05-12 15:00:04",
  "updateUser": "0",
  "code": "HZ000003",
  "name": "王姐",
  "personName": "王丽莉",
  "phone": "12021236632",
  "email": "123456@itcast.com",
  "location": "北京市/市辖区/东城区",
  "province": "110000",
  "city": "119900",
  "area": "110101",
  "address": "合立方小区",
  "status": 0,
  "remark": "",
  "createName": "刘世娟",
  "updateName": "刘世娟",
  "logicDel": 1
},{
"id": "798980939605607297",
"createTime": "2023-05-11 18:25:01",
"createUser": "0",
"updateTime": "2023-05-12 15:00:04",
"updateUser": "0",
"code": "HZ000003",
"name": "王姐",
"personName": "王丽莉",
"phone": "12021236632",
"email": "123456@itcast.com",
"location": "北京市/市辖区/东城区",
"province": "110000",
"city": "119900",
"area": "110101",
"address": "合立方小区",
"status": 0,
"remark": "",
"createName": "刘世娟",
"updateName": "刘世娟",
"logicDel": 1
},
{
"id": "798980939605607297",
"createTime": "2023-05-11 18:25:01",
"createUser": "0",
"updateTime": "2023-05-12 15:00:04",
"updateUser": "0",
"code": "HZ000003",
"name": "王姐",
"personName": "王丽莉",
"phone": "12021236632",
"email": "123456@itcast.com",
"location": "北京市/市辖区/东城区",
"province": "110000",
"city": "119900",
"area": "110101",
"address": "合立方小区",
"status": 0,
"remark": "",
"createName": "刘世娟",
"updateName": "刘世娟",
"logicDel": 1
},
{
"id": "798980939605607297",
"createTime": "2023-05-11 18:25:01",
"createUser": "0",
"updateTime": "2023-05-12 15:00:04",
"updateUser": "0",
"code": "HZ000003",
"name": "王姐",
"personName": "王丽莉",
"phone": "12021236632",
"email": "123456@itcast.com",
"location": "北京市/市辖区/东城区",
"province": "110000",
"city": "119900",
"area": "110101",
"address": "合立方小区",
"status": 0,
"remark": "",
"createName": "刘世娟",
"updateName": "刘世娟",
"logicDel": 1
},
{
"id": "798980939605607297",
"createTime": "2023-05-11 18:25:01",
"createUser": "0",
"updateTime": "2023-05-12 15:00:04",
"updateUser": "0",
"code": "HZ000003",
"name": "王姐",
"personName": "王丽莉",
"phone": "12021236632",
"email": "123456@itcast.com",
"location": "北京市/市辖区/东城区",
"province": "110000",
"city": "119900",
"area": "110101",
"address": "合立方小区",
"status": 0,
"remark": "",
"createName": "刘世娟",
"updateName": "刘世娟",
"logicDel": 1
},
{
"id": "798980939605607297",
"createTime": "2023-05-11 18:25:01",
"createUser": "0",
"updateTime": "2023-05-12 15:00:04",
"updateUser": "0",
"code": "HZ000003",
"name": "王姐",
"personName": "王丽莉",
"phone": "12021236632",
"email": "123456@itcast.com",
"location": "北京市/市辖区/东城区",
"province": "110000",
"city": "119900",
"area": "110101",
"address": "合立方小区",
"status": 0,
"remark": "",
"createName": "刘世娟",
"updateName": "刘世娟",
"logicDel": 1
},
      {
          "id": "798980735426888481",
          "createTime": "2023-05-11 18:24:12",
          "createUser": "0",
          "updateTime": "2023-05-12 15:00:04",
          "updateUser": "0",
          "code": "HZ000002",
          "name": "李婉婉",
          "personName": "李婉婉",
          "phone": "12021233252",
          "email": "123456@itcast.com",
          "location": "天津市/市辖区/和平区",
          "province": "120000",
          "city": "129900",
          "area": "120101",
          "address": "一家小区",
          "status": 0,
          "remark": "",
          "createName": "刘世娟",
          "updateName": "刘世娟",
          "logicDel": 1
      }
  ]
  const findOne=(id)=>{
    const arr=Allarray.find(v=>v.id==id)
    console.log(arr);
    return arr
  }
module.exports = [
{
  url:'/owner/page',
  type:'get',
  response: config => {

  let array
  if('like_code 'in config.query){
   array=Allarray.filter(v=>{
    const code =config.query.like_code===''||v.code=== config.query.like_code
   const name=config.query.like_name===''||v.name===config.query.like_name
   const personName=config.query.like_personName===''||v.person===config.query.like_personName
   console.log(code,name,personName);
   return code&&
   name&&
   personName
  })
  }else{
    array=Allarray
  }
    const num=+config.query.current*(+config.query.size)
    let arr=array.slice(num-(+config.query.size),num)
    return {
      "code": 0,
      "data": {
          "records": arr,
          "total": Allarray.length,
          "size": config.query.size,
          "current": config.query.current,
          "pages": config.query.current
      },
      "msg": "ok",
      "timestamp": Date.now(),
      "isSuccess": true,
      "isError": false
  }
  }
},{

  url:'owner/detail',
  type:'get',
  response:(config)=>{
    return {
      "code": 0,
      "data":  findOne(config.query.id),
      "msg": "ok",
      "timestamp": Date.now(),
      "isSuccess": true,
      "isError": false
  }
  }
}

]
